<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit agent</title>
</head>
<body>
	
	<form:form action="${pageContext.request.contextPath}/admins/edit-advertiser" modelAttribute="editedAdvertiser" method="POST">
		<form:hidden path="id"/>
<!-- 		<br> -->
<%-- 		<form:label path="username">Username</form:label> --%>
<%-- 		<form:input type="text" path="username" disabled="true" /> --%>
		<br>
		<form:label path="firstname">Firstname</form:label>
		<form:input type="text" placeholder="Firstname" path="firstname" />
		<form:errors path="firstname"></form:errors>
		<br>
		<form:label path="lastname">Lastname</form:label>
		<form:input type="text" placeholder="Lastname" path="lastname" />
		<form:errors path="lastname"></form:errors>
		<br>
		<form:label path="advertiserType">Advertiser type</form:label>
		<form:select path="advertiserType" items="${ advertiserTypes }"></form:select>
		<form:errors path="advertiserType"></form:errors> 
		<br>
		<form:label path="email">Email</form:label>
		<form:input placeholder="Email" path="email" type="email" required="true" />
		<form:errors path="email"></form:errors>
		<br>
		<form:label path="address">Address</form:label>
		<form:input type="text" placeholder="address" path="address" />
		<form:errors path="address"></form:errors>
		<br>
		<form:label path="phoneNumber">Phone number</form:label>
		<form:input type="text" placeholder="phoneNumber" path="phoneNumber" />
		<form:errors path="phoneNumber"></form:errors>
		<br>
<!-- 		<input type="reset" value="Reset"> -->
		<input type="submit" value="Edit">
	</form:form>
	
	<br>

</body>
</html>